<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>MyJsonParseView</title>
		<meta name="author" content="mili" />
		<!-- Date: 2012-11-27 -->
	</head>
	
	<body>
	<p>
		First Name: <span id="fname"></span><br> 
		Last Name: <span id="lname"></span><br> 
	</p> 		
		
	<script>
		//var obj = jQuery.parseJSON('{"name":"John"}');
		document.write( "try" );
		
		var txt = '{"employees":[' +
		'{"firstName":"John","lastName":"Doe" },' +
		'{"firstName":"Anna","lastName":"Smith" },' +
		'{"firstName":"Peter","lastName":"Jones" }]}';

		obj = JSON.parse(txt);

		document.getElementById("fname").innerHTML=obj.employees[1].firstName 
		document.getElementById("lname").innerHTML=obj.employees[1].lastName 
	
	</script>
	</body>
</html>

